package com.weicoder.shop.po

import javax.persistence.Entity
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import com.weicoder.base.annotation.Cache
import com.weicoder.base.entity.EntityIp
import com.weicoder.site.entity.base.BaseEntityIdTime;
import scala.beans.BeanProperty

/**
 * 商品评论
 * @author WD
 * @since JDK7
 * @version 1._ 2_12-_6-29
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Entity
@DynamicInsert
@DynamicUpdate
@Cache
class Comment extends BaseEntityIdTime with EntityIp {
  // 商品ID
  @BeanProperty
  var goodsId: Integer = _
  // IP
  @BeanProperty
  var ip: String = _
  // 内容
  @BeanProperty
  var content: String = _
  // 评论ID
  @BeanProperty
  var commentId: Integer = _
  // 联系方式
  @BeanProperty
  var contact: String = _
  // 名称
  @BeanProperty
  var name: String = _
}
